<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function f() {
        for(let i=1;i<=10;i++){
            document.write(i+" ")
        }
    }
    f()
</script>
</body>
</html>